//
//  NetServiseCommonData.m
//  MediumMottoUnion
//
//  Created by liuchang on 14-9-12.
//  Copyright (c) 2014年 liuchang. All rights reserved.
//

#import "NetServiseCommonData.h"

@implementation NetServiseCommonData


+(NSDictionary*)getDoYouLoveData{
    
    NSDictionary* dic = [self parseData:@"DoYouLoveList.json"];
    return dic;
}

+(NSDictionary *)getShareData{
    
    NSDictionary* dic = [self parseData:@"ShareList.json"];
    return dic;
}

+(NSDictionary *)getOtherData{
    
    NSDictionary* dic = [self parseData:@"OtherList.json"];
    return dic;
}

+(NSDictionary *)getOrderDetailData{
    
    NSDictionary* dic = [self parseData:@"OtherDetailList.json"];
    return dic;
}

+(NSDictionary *)getShoppingData{
    
    NSDictionary* dic = [self parseData:@"ShoppingList.json"];
    return dic;
}

+(NSDictionary *)getActivityCallupListData{
    NSDictionary* dic = [self parseData:@"ActivityCallup.json"];
    return dic;
}

+(NSDictionary *)getRepairHistoryListData{
    NSDictionary* dic= [self parseData:@"RepairHistoryList.json"];
    return dic;
}

+(NSDictionary *)getRepairHistoryDetailData{
    NSDictionary* dic= [self parseData:@"RepairHistoryDetail.json"];
    return dic;
}


+(NSDictionary *)getShoppingCartData{
    NSDictionary* dic = [self parseData:@"ShoppingCartList.json"];
    return dic;
}

+(NSDictionary *)getAddressData{
    NSDictionary* dic = [self parseData:@"AddressList.json"];
    return dic;
}

+(NSDictionary *)getEvaluateData{
    NSDictionary* dic = [self parseData:@"Evaluate.json"];
    return dic;
}

+(NSDictionary *)getPariseData{
    NSDictionary* dic = [self parseData:@"PariseList.json"];
    return dic;
}

+(NSDictionary *)getPropertyAddressData{
    
    NSDictionary *dic = [self parseData:@"Address.json"];
    return dic;
}

+(NSDictionary *)getWaitPayAddressData{
    
    NSDictionary *dic = [self parseData:@"WaitPayFor.json"];
    return dic;
}

+(NSDictionary *)getRecordData{
    
    NSDictionary *dic = [self parseData:@"Record.json"];
    return dic;
}

+(NSDictionary *)getAdvacePoiListData{
    NSDictionary *dic = [self parseData:@"AdvacePoiList.json"];
    return dic;
}

//解析json数据
+ (id) parseData:(NSString *) fileName
{
    NSString  *path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:fileName];
    NSData  *jsonData = [NSData dataWithContentsOfFile:path];
    id result = nil;
    
    result =  [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableContainers error:nil];
    
    return result;
}

@end
